Packages

Packages are encapsulated collections of related procedures, stored functions, and other program objects stored together in the database. An package consists of two parts: a specification and a body. In the main window, click Others Others -> Package Package to open the package object list.

Package Designer & Package Body Designer

Package Designer and Package Body Designer are the basic Navicat tools for working with packages. After saving the package in Package Designer, you can edit its package body by clicking Design Package Body.

Likewise, you can edit its package specification by clicking Design Package Specification in Package Body Designer.

You can enter a valid SQL statement in the Definition tab. To customize the view of the editor and find out more features for SQL editing, see SQL Editor for details.

The Code Outline pane displays information about the package/package body including function, procedure, parameter, code body, etc. If the Code Outline pane is hidden, choose View -> Code Outline.

Note: Available only in Non-Essentials Edition.

Button

Description

Refresh

Refresh the code outline.

Highlight

Turn mouse over highlight on or off.

Detail

Show the detail view of the code outline.

Sort

Toggle sorting by position.

Expand

Expand the selected item.

Collapse

Collapse the selected item.

Results

To execute the package, click Run on the toolbar. If the SQL statement is correct, the statement will be executed and, if the statement is supposed to return data, the DBMS Output tab opens with the data returned. If an error occurs while executing the package, execution stops, the appropriate error message is displayed. If the package requires input parameters, the Input Parameters dialog will pop up.

Debug (Available only in Non-Essentials Edition)

You can add/remove breakpoints for debugging by clicking Breakpoint in the grey area beside each statement.

Click Debug on the toolbar to launch the Oracle Debugger. Enter the input parameters if necessary.